package com.hmc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class SQLHelper {
    public static Connection getOracleConnection() throws ClassNotFoundException, SQLException {
        Class.forName("oracle.jdbc.driver.OracleDriver"); // 加载数据库驱动
        String url = "jdbc:oracle:thin:@127.0.0.1:1521:orcl"; // 连接URL
        String username = "SGGGM1";
        String password = "123456";
        Connection connection = DriverManager.getConnection(url, username, password);
        return connection;
    }
}
